
/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"6F99B1E1-720C-4BE3-AFF0-45EDE85FC8AA"}
 */
function cancelar(event) {
	controller.deleteRecord()
	cerrar()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"95DBA9CC-DC95-462B-9A14-2AE171A91D3F"}
 */
function confirmar(event) {
	databaseManager.saveData(foundset.getRecord(foundset.getSelectedIndex()))
	if (globals.gEstadoAbm == 0)
		databaseManager.setAutoSave(true)
	cerrar()
}

/**
 * @properties={typeid:24,uuid:"A5F5F50F-2C0D-4253-8CC6-B9436352CA08"}
 */
function cerrar()
{
	var $win = application.getWindow('ALTA_CONTACTO')
	$win.hide()
	$win.destroy()
}